Release 10.1A: OpenEdge Development:
Programming Interfaces
Mapping routine identifiers using PRODSP()
You map routine identifiers to C functions in the
Note: ThePRODSP()dispatch routine. Progress provides a prototypePRODSP()in the C source file,hlprodsp.c.$DLC/oebuild/hlcdirectory on UNIX and the%DLC%\oebuild\hlcdirectory in Windows contain a prototypehlprodsp.cfile. Do not modify this file. To make changes, copy it to a working directory and modify the copy.Because Progress calls the
PRODSP()dispatch routine, it must have the following declaration:
The hlprodsp.c file shows routine-identifier
hlcroutinebeing mapped to the C functionhlcfunc()inPRODSP():
For each routine you add, you must include a call to the
FUNCTESTmacro. For example, to map two routine names, such asHLCROUTINE1andHLCROUTINE2, to two corresponding
C functions, such ashlcfunc1()andhlcfunc2(), you must include the following lines inPRODSP():
Note: The
CALLstatement andFUNCTESTdeclaration must use the same letter case for the routine identifier.The
FUNCTESTmacro inhlprodsp.chas the following syntax:
The
routine-identifieris the name referenced by aCALLstatement that identifies your C function. Enter the routine identifier as a character string surrounded by quotes. SinceFUNCTESTdoes not convert case for the routine identifier, the case is significant.The
function-nameis the name of the C function that theroutine-identifierreferences.The routine identifier and function name can have the same name:
When you compile
hlprodsp.c, the C compiler translates theFUNCTESTmacro references to C code. For example:
translates to:
Therefore, when Progress invokes
PRODSP()with the argumentHLCROUTINE, it runshlcfunc.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |